package com.jtpay.sdk.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

import com.channel.test.tblPassageTimeStatistics;
import com.jtpay.sdk.R;

public class TimerDetailActivity extends Activity {
    private TextView timerDetailTextview;
    private tblPassageTimeStatistics mPassageTimeStatistics;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_timer_detail);
        initView();
    }

    private void initView() {
        timerDetailTextview= (TextView) findViewById(R.id.timerDetailTextview);
        try {
            mPassageTimeStatistics=getIntent().getParcelableExtra("passageData");
        } catch (Exception e) {
            e.printStackTrace();
            timerDetailTextview.setText("Error!");
        }
        timerDetailTextview.setText(String.format("平台名称:\t%s\n", mPassageTimeStatistics.getPlatform()));
        timerDetailTextview.append(String.format("支付方式:\t%s\n", mPassageTimeStatistics.getPayType()));
        timerDetailTextview.append(String.format("通道名称:\t%s\n", mPassageTimeStatistics.getPassageName()));
        timerDetailTextview.append(String.format("token时间:\t%s\n", mPassageTimeStatistics.getTokenTime()));
        timerDetailTextview.append(String.format("拉起时间:\t%s\n", mPassageTimeStatistics.getPullupTime()));
        timerDetailTextview.append(String.format("支付回调:\t%s\n", mPassageTimeStatistics.getPayQueryTime()));
        timerDetailTextview.append(String.format("支付结果:\t%s\n", mPassageTimeStatistics.getPayStatus()));
    }
}
